<h1 class="page_title">邮箱页面</h1>
<div class="panel panel-default">
    <div class="panel-body" style="height: 400px;">
        <form class="mt-50">
            <div class="row cl">
                <label class="form-label col-xs-3" style="text-align: right">${teacher.teacherName}老师邮箱：</label>
                <div class="formControls col-xs-8">
                    <a href="mailto:${teacher.email!''}">${teacher.email!'未填写'}</a>
                    <div><h6>有问题可邮箱联系教师</h6></div>
                </div>
            </div>
            <br>
            <div class="row cl">
            <label class="form-label col-xs-3" style="text-align: right">学生邮箱地址：</label>
            <div class="formControls col-xs-8">
                <input id="email" class="input-text" type="email" value="${student.email!''}" placeholder="学生邮箱">
                <div><h6>学生邮箱只对教师可见，方便教师联系学生</h6></div>
            </div>

        </div>
        <br>
        <div class="row cl">
            <div class="col-xs-8 col-xs-offset-3">
                <input id="addBtn" class="btn btn-primary" type="button" value="&nbsp;&nbsp;添加&nbsp;&nbsp;">
                <input class="btn btn-danger" type="reset" value="&nbsp;&nbsp;重置&nbsp;&nbsp;">
            </div>
        </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    $("#addBtn").on("click", function () {
        stupidAjaxGetJson("/stu/email/", "POST", {email:$("#email").val()}, function (data) {
            alert(data.msg);
            if (data.success) {
            } else {
                $("#email").val("");
            }
        });
    });
</script>